/* GUI CONVERTED from rcshmtb1.p (converter v1.76) Thu Mar 21 15:32:43 2002 */
/* rcshmtb1.p - Release Management Customer Schedules                   */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/* $Revision: 1.6.1.2 $                                                         */
/*V8:ConvertMode=Maintenance                                            */
/* REVISION: 7.3    LAST MODIFIED: 08/13/93           BY: WUG *GE19*    */
/* REVISION: 7.3    LAST MODIFIED: 09/27/93           BY: WUG *GF98*    */
/* Oracle changes (share-locks)    09/12/94           BY: rwl *GM44*    */
/* REVISION: 7.3    LAST MODIFIED: 04/11/95           BY: ame *F0QB*    */
/* REVISION: 7.3    LAST MODIFIED: 05/15/95           BY: dxk *G0MT*    */
/* REVISION: 7.3    LAST MODIFIED: 08/10/95           BY: bcm *G0TB*    */
/* REVISION: 8.6    LAST MODIFIED: 05/20/98           BY: *K1Q4* Alfred Tan */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00           BY: *N0KP* myb        */
/* Old ECO marker removed, but no ECO header exists *F0PN*                  */
/* $Revision: 1.6.1.2 $    BY: Rajaneesh S.        DATE: 02/21/02  ECO: *L13N*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

      /* SHIPPER MAINT SUBPROGRAM */

/* Delete sr_wkfl records from databases */

{mfdeclre.i}
define input parameter user_id       as character.
define input parameter line_id       as character.
define input parameter remote_db     as logical.
define input parameter shipfrom-site as character.

define variable old_db  as character.
define variable sdb_err as integer no-undo.

for each sr_wkfl exclusive-lock
   where sr_userid = user_id
     and sr_lineid = line_id:
   delete sr_wkfl.
end.

for each lotw_wkfl
   where lotw_mfguser = mfguser
   exclusive-lock:
   delete lotw_wkfl.
end. /* FOR EACH lotw_wkfl */


if not remote_db
then do:
   find si_mstr where si_site = shipfrom-site no-lock.

   if available si_mstr and si_db <> global_db
   then do:
      old_db = global_db.

      {gprun.i ""gpalias3.p"" "(input si_db, output sdb_err)"}
/*GUI*/ if global-beam-me-up then undo, leave.


      {gprun.i ""rcshmtb1.p"" "(input user_id, input line_id,
                                input yes,     input shipfrom-site)"}
/*GUI*/ if global-beam-me-up then undo, leave.


      {gprun.i ""gpalias3.p"" "(input old_db, output sdb_err)"}
/*GUI*/ if global-beam-me-up then undo, leave.

   end.
end.
